﻿//-----------------------------------------------------------------------
// <copyright file="Production.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Production class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Markup;
    using Collections;

    /// <summary>
    /// Represents a production within the runtime model.
    /// </summary>
    [ContentProperty("Expressions")]
    public class Production : ElementBase
    {
        /// <summary>
        /// Initializes a new instance of the Production class.
        /// </summary>
        public Production()
        {
            this.Expressions = new Expressions();
        }

        /// <summary>
        /// Gets or sets a reference to a tuple definition for this production.
        /// </summary>
        public string TupleRef { get; set; }

        /// <summary>
        /// Gets or sets the salience of the production.
        /// </summary>
        public int Salience { get; set; }

        /// <summary>
        /// Gets or sets the position of the production.
        /// </summary>
        public int Position { get; set; }

        /// <summary>
        /// Gets or sets the a complexity measure of the production.
        /// </summary>
        public int Specificity { get; set; }

        /// <summary>
        /// Gets or sets the user-readable text rendering of production actions.
        /// </summary>
        public string ActionText { get; set; }

        /// <summary>
        /// Gets the collection of expressions for this production.
        /// </summary>
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public IList<Expression> Expressions { get; private set; }
    }
}
